if (ds_list_find_value(global.team,global.team_member_current) == id)
{
talking_to = collision_line(x,y+16,x+(24*dir),y+16,obj_actor,true,true);
if (global.control == 1) && (global.inventory == false)
{
if (automove == false)
{
walking = (((keyboard_check(global.dpad[2]) == true) && (dir == -1)) || ((keyboard_check(global.dpad[3]) == true) && (dir == 1)));
if (actor_floorbelow(1) == true)
{
jumping = (keyboard_check_pressed(global.button[0]) == true);
}
else
{
jumping = (keyboard_check_released(global.button[0]) == false);
}
running = (keyboard_check(global.button[1]) == true) && (walking == true);
crouching = ((keyboard_check(global.dpad[1])) && (actor_floorbelow(1) == true));
attacking = (keyboard_check(global.button[1]));
talking = ((keyboard_check_pressed(global.button[2])) && (talking_to>0) && (vsp=0));
acting = (keyboard_check_pressed(global.button[2]) || keyboard_check_pressed(global.dpad[0]));
if (keyboard_check(global.dpad[2]) == true) && (hsp == 0)
{
dir = -1;
}
if (keyboard_check(global.dpad[3]) == true) && (hsp == 0)
{
dir = 1;
}
if (keyboard_check_released(global.button[0]) == true) && (can_jump == false)
{
can_jump = true;
}
if (keyboard_check_released(global.button[0]) == true) && (can_attack == false)
{
can_attack = true;
}
if equipped != -1{
if (ds_list_find_value(global.inventory_item[0],equipped) != 0)
{
if (ds_list_find_value(global.inventory_item[2],equipped) > 0)
{
if (keyboard_check(global.button[4]) == true)
{
inventory_item_use(equipped);
}
}
else{
if (keyboard_check_pressed(global.button[4]) == true)
{
inventory_item_use(equipped);
}
}
}
else{
equipped = -1;
}
}
}
else
{
walking = true;
crouching = false;
jumping = false;
attacking = false;
running = false;
acting = false;
talking = false;
}
}
view_object[0] = id;
depth = -1;
}
else
{
if (ds_list_find_index(global.team,id) > -1){
character_behavior_follow();
depth = 0;
}
}
